import firebirdsql

# The server is named 'sa-fs7.tb.local'; the database file is at 'C:\IM_SW\Search\DB\SEARCH4.GDB'.
con = firebirdsql.connect(
	host='sa-fs7.tb.local', database='C:\IM_SW\Search\DB\SEARCH4.GDB',
	user='sysdba', password='imech'
	)

# Create a Cursor object that operates in the context of Connection con:
cur = con.cursor()

# Execute the SELECT statement:
cur.execute("select * from SSECTIONS WHERE SECTION_ID<10")
s=cur.fetchall()
# Retrieve all rows as a sequence and print that sequence:
for row in s:
	print (row[0])

con.close()